package com.shell.governor.security.user.controller;

import com.shell.bee.base.annotation.Logging;
import com.shell.bee.entity.mvc.RetMsg;
import com.shell.bee.mvc.controller.BaseController;
import com.shell.governor.security.user.po.PubReservationInfo;
import com.shell.governor.security.user.service.PubReservationInfoService;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PubReservationInfoController extends BaseController {
	@Autowired
	private PubReservationInfoService pInfoService;

	@RequestMapping({ "auth/check-reservation-info" })
	@Logging(module = "��������", methods = "������������������������")
	public RetMsg checkReservationInfo(String loginName, String infoDesc, String svertificationCode,
			HttpServletRequest request) throws Exception {
		return this.pInfoService.selectPubReservationInfoByLoginName(loginName, infoDesc, svertificationCode);
	}

	@RequestMapping
	@Logging(module = "��������", methods = "����������������")
	public PubReservationInfo selectReservationInfo(HttpServletRequest request) {
		return this.pInfoService.selectPubReservationInfo();
	}

	@RequestMapping
	@Logging(module = "��������", methods = "����������������")
	public RetMsg updateReservationInfo(PubReservationInfo pInfo, HttpServletRequest request) {
		return this.pInfoService.updatePubReservationInfo(pInfo);
	}
}
